import {take,call,put,fork} from 'redux-saga/effects';
import getHotSeachData from '../servers/serHotSeach';
function *sagHotSeach() {
    while (true){
        yield take('HOTSEACH');
        let payload=yield call(getHotSeachData);
        let aHotKeyWords=[];
        if(payload.code===200){
            aHotKeyWords=payload.data
        };
        yield put({type:'hotseach',data:{aHotKeyWords:aHotKeyWords}})
    }
}
export default [
    fork(sagHotSeach)
]